The present invention relates to data processing systems and, more particularly described, relates to allocating resources for use by devices of a computer system.
The process of installing a peripheral device or an add-on type adapter board for use with a personal computer can be a relatively frustrating experience for the typical computer user. Nevertheless, a computer typically will not operate with a newly installed component until the user has completed a proper allocation of resources. Computer resources are allocated during a configuration process to permit the conflict-free use of the limited resources. To configure the computer, the user often must complete a relatively complex series of technical tasks. Thus, the difficulties faced by many users during the configuration process are emphasized by the absence of an automated process for resolving resource conflicts.
For many personal computers, neither the operating system nor the application programs running on the computer can determine which hardware components are connected to the computer. Likewise, the various hardware components connected to the computer often fail to detect the occurrence of a conflict between different hardware devices that attempt to share the same resource. Accordingly, a user typically must resolve a resource conflict by first identifying the problem and thereafter experimenting with hardware and software configurations in an attempt to correct the resource conflict.
When attempting to tackle hardware and software integration issues, the user is exposed to technical concepts that can be somewhat confusing for those without technical training, such as computer architecture issues, including hardware interrupts, direct memory access (DMA) channels, memory addresses, and input/output (I/O) ports. Likewise, many common configuration tasks require the user to be familiar with the finer details of the computer""s operating system, including system configuration files, such as AUTOEXEC.BAT, CONFIG.SYS, and .INI files. In view of these technical concepts, some users find the configuration process so intimidating that they refuse to consider upgrading a component of their personal computer or connecting a new peripheral device to add a new capability to their computer.
Unlike today, early personal computers required minimum coordination between the computer hardware and software components. Users were presented with few difficult configuration issues after the initial installation of the computer. A limited number of peripheral devices were commercially available for supplementing the processing functions of the personal computer. In addition, early personal computers were primarily used for dedicated tasks, such as word processing or calculating financial information with a spreadsheet program, at a fixed desktop location.
In contrast, present computers are often portable systems that can be regularly connected to different peripheral devices and external systems. There exists many more computer peripheral devices that require the use of resources during computer operation than the limited quantity of available resources. Furthermore, a user can harness the powerful computing operations of a present personal computer to complete numerous tasks outside the traditional realm of word processing and financial calculations, such as graphics, audio, and video. For example, numerous peripheral devices and add-on systems are now commercially available to enable the user to customize the functions and operating characteristics of a personal computer. Docking-type computers enable a user to operate a mobile computer at either a base station or in remote locations. Thus, the rapid acceptance of portable computing and the multi-faceted uses of the personal computer emphasize the need for supplying a xe2x80x9cuser friendlyxe2x80x9d system that configures new hardware or software devices for use with the computer.
The Industry Standard Architecture (ISA) standard is a widely used bus architecture for personal computers. The ISA expansion bus, which is commonly associated with the IBM Personal Computer AT and other compatible computers, provides a 16-bit bus that supports the connection of adapter boards within the computer. The ISA bus structure requires allocation of resources, such as hardware interrupts, DMA channels, memory addresses, and I/O ports, among multiple ISA-compatible adapter boards connected to the ISA expansion bus. However, the ISA standard does not define a hardware or software mechanism for allocating those resources for use by the installed adapter boards. Consequently, configuration of the ISA adapter boards is typically completed by connecting jumper blocks or changing switch settings on the boards to change the decode maps for memory and I/O ports and to direct the DMA channels and interrupt signals to various pins along the expansion bus. Furthermore, system configuration program files of the operating system may need to be updated to reflect any modifications to the resource allocation.
Alternative expansion bus standards, such as the Micro Channel Architecture (MCA) and the Extended Industry Standard Architecture (EISA) standards, have limited hardware and software mechanisms to identify resources requested by a peripheral device and to resolve resource conflicts. However, these mechanisms are not implemented by the computer""s operating system and are not compatible with the large installed base of personal computers based on the ISA standard. Furthermore, computers implementing the MCA and EISA standards are generally more expensive than ISA-compatible computers and lack the variety of add-on adapter boards and peripheral devices available for use with ISA-compatible computers.
To address the issue of configuration management, the computer industry is at present offering full-featured computers having preconfigured hardware and preinstalled software, thereby eliminating the need for a user to conduct the installation and configuration tasks for the purchased computer. However, this is a somewhat limited solution because vendors typically market a computer having a standard configuration of hardware and software components. Thus, this approach defeats the flexibility offered by the ISA bus expansion structure because users cannot obtain a computer capable of performing a customized function through this standardized configuration approach.
To overcome the frustration of users with present complicated configuration processes, it would be desirable to provide a system for xe2x80x9cautomaticallyxe2x80x9d configuring a peripheral device or adapter board for a computer. A system is needed to enable a user to simply connect a device to the computer, turn on the computer, and have the device properly work with the computer. This system would determine the optimal configuration for its resources and enables application programs to fully utilize the available resources.
In recognition of the problems of prior configuration processes, the present invention provides a system that permits easy installation and configuration of devices which are capable of identifying themselves and declaring their services and resource requirements to the computer. The device identification and resource requirement information enable the system to determine and establish a working configuration for all devices connected to the computer. Accordingly, the present invention efficiently allocates system resources between the devices of the computer without substantial user intervention.
Problems associated with the manual installation and configuration of adapter boards and peripheral devices for computers are solved by the principles of the present invention. The present invention provides a system for allocating resources to support conflict-free operation by the components of a computer. The present invention addresses the needs of computer users by supplying a computer-implemented process for allocating resources for use by devices of a computer and for supporting dynamic configuration changes of the computer.
A system constructed in accordance with the present invention allocates resources for use by devices of a computer. The computer includes various resources, including interrupts, direct memory access (DMA) channels, memory addresses, and input/output (I/O) ports, at least one system bus, and devices. System busses are components that supply physical connections to devices. Each of the devices is connected to one of the system busses of the computer.
The system busses can be compatible with a variety of bus architectures, including the Industry Standard Architecture (ISA), Micro Channel Architecture (MCA) and Extended Industry Standard Architecture (EISA) bus standards, as well as Personal Computer Memory Card International Association (PCMCIA), Small Computer Systems Interface (SCSI), Personal Computer Interface (PCI), Enhanced Capabilities Parallel (ECP), Vesa Local Bus (VL), Integrated Drive Electronics (IDE), and other bus standards. Devices supply the functions of system-level components, such as fixed and floppy disk controllers, display, keyboard, and mouse controllers, and serial and parallel controllers, and implement the functions offered by numerous add-on type adapter boards and peripheral devices.
Briefly described, device information is collected for each of the devices of the computer. This device information acquisition process permits the unique identification of the devices and the description of device characteristics associated with the operation of devices with the computer. A device driver, which enables communications between a corresponding device and the computer, is thereafter identified for each of the devices in response to the device information. The resources, which support the functions of the devices within the computer, are allocated based upon the device information. This allocation process prevents any potential conflicting use of resource elements by the devices. In response to resource allocation, the devices are configured and device drivers are loaded to support the operation of these devices.
More particularly described, devices of a computer are configured based upon the collection of information about the devices and their connections to the system busses of the computer. To collect the device information, a particular device is detected on the system bus of interest and thereafter assigned a device identification code that identifies the particular device as being connected to the selected system bus. At least a portion of the device identification code, specifically the identification code, uniquely identifies the detected device. Logical configuration data, which supplies configuration requirements for operating the particular device with the computer, is also obtained for the detected device. This collection process is repeated until device information is eventually collected for each of the devices for all system busses of the computer.
The device information is stored within computer memory, such as volatile memory, to support the present configuration operation. At least a portion of the system memory is allocated for the storage of device information within a tree-like structure of device nodes. Each device connected to the computer is represented by a device node that stores associated device information. Furthermore, if an identified device represents a newly installed device for the computer, then this device information also can be stored in nonvolatile computer memory, such as a fixed disk, to supply an archival source of such information for future configuration tasks. A computer database known as a registry is typically used to store this archival device information.
The collection of device information supplies data that supports the identification of device drivers for the identified devices. A device driver can be obtained from one of several alternative sources of the computer, including selected files of the operating system installed on the computer, the device itself, a computer database maintained by the computer, or from the user via a disk containing the device driver. In general, the device driver for a device is often obtained by accessing a selected program file stored on either a fixed disk or another type of mass memory storage device of the computer.
The resources of the computer system represent a finite set of resource elements. Certain devices require access to specific resource element for proper operation with the computer. For example, a typical device configuration requirement for a modem defines specific interrupt elements, such as IRQ2 and IRQ3, for proper operation of the modem with a computer. Accordingly, the logical configuration data for certain devices may specify specific resource elements and, for others, the logical configuration data may define general resource requirements. Resource elements are considered to be xe2x80x9creservedxe2x80x9d if they are maintained for use only by certain predetermined devices, such as selected devices that are activated only after a computer boot. In contrast, resource elements are considered to be xe2x80x9cnonreservedxe2x80x9d if they are maintained for use by any device.
An arbitration process allocates resource elements for use by devices of the computer in a manner that satisfies the configuration requirements of each device and avoids a potential conflicting use of the resource elements. The configuration requirements for the devices are defined by the logical configuration data collected from the devices of the computer. Although the arbitration process is implemented as an iterative routine, the process can be generally viewed as a mechanism of allocating resource elements based upon the availability of those resource elements. A resource element is available to satisfy the requirement for a nonreserved resource element of a device configuration if that resource element is neither reserved for use by another device nor assigned for use by another device. Likewise, a resource element is available for satisfying the requirement of a reserved resource element of a device configuration if that element is reserved for possible use by the device. It will be appreciated that the reserved resource elements represent a prioritized set of the resource elements that are held in reserve for possible use by selected devices, whereas the nonreserved resource elements representing the remaining resource elements.
For the selected resource, the arbitration method then completes one or more arbitration tasks based on the availability of resource elements and the resource element requirements defined by a list of device configurations. The logical configuration data supports the definition of a device configuration associated with each device. In turn, the device configurations define requirements for the resource elements necessary support the operation of corresponding devices with the computer. First, an arbitration task is conducted to determine whether one of the nonreserved resource elements is available to satisfy the resource element requirement for a selected device configuration and whether other nonreserved resource elements are available to satisfy the resource element requirements for the remaining device configurations. A nonreserved resource element is available if the nonreserved resource element is not listed in an allocated resource list that specifies the resource elements allocated for use by the devices of the computer. If available, then this nonreserved resource element is allocated to the selected device configuration, and other available nonreserved resource elements are allocated to the remaining device configurations. Each nonreserved resource element is allocated by adding an entry representing the nonreserved resource element to a temporary storage list during the arbitration process. These entries are then transferred to the allocated resource list in response to a successful allocation of resource elements.
Otherwise, a second arbitration task is completed to determine whether one of the reserved resource elements is available to satisfy the resource element requirement for the selected device configuration and whether nonreserved resource elements are available to satisfy the resource element requirement for the remaining device configurations. A reserved resource element is available if (1) the reserved resource element is listed in a reserved resource list that specifies the resource elements allocated for possible use by the devices of the computer, and (2) is not listed in the allocated resource list. If available, then the reserved resource element is allocated to the selected device configuration and available nonreserved resource elements are allocated to the remaining device configurations. A reserved resource element is allocated by adding an entry representing the reserved resource element to a temporary storage list during the arbitration process. These entries are then transferred to the allocated resource list in response to a successful allocation of resource elements.
Otherwise, another arbitration task is completed to determine whether a nonreserved resource element is available to satisfy the resource element requirement for the selected device configuration and whether either nonreserved resource elements or reserved resource elements are available to satisfy the resource element requirements for the remaining device configurations. If so, then the available nonreserved resource element is allocated to the selected device configuration, and the available nonreserved resource elements or reserved resource elements are allocated to each of the remaining device configurations.
Otherwise, a final arbitration task is completed to determine whether one of the reserved resource elements is available to satisfy the resource element requirement for the selected device configuration and whether either nonreserved resource elements or reserved resource elements are available to satisfy the resource element requirements for the remaining device configurations. If so, then the available reserved resource element is allocated to the selected device configuration, and the available nonreserved resource elements or reserved resource elements are allocated to the remaining device configurations. Otherwise, a configuration failure is declared because resource elements are not available to satisfy the resource element requirements defined by the device configurations.
The list of device configurations can be sorted prior to the start of the arbitration tasks to facilitate the resource arbitration process. To build the list of device configurations, logical configuration data is obtained for each of the devices. The list of device configurations is then prepared in response to the logical configuration data. The list of device configurations is sorted based on the complexity of the resource elements for each of the device configurations. The list of device configurations is typically ordered from the device configuration having the least resource element complexity to the device configuration having the most resource element complexity.
The resource arbitration process is supported by arbitrators that operate to determine the assignment of resource elements to the devices of the computer. An arbitrator can be assigned to each resource of the computer and is responsive to the resource element requirements of the device configurations to support the conflict-free allocation of resource elements. The arbitrator for a selected resource is programmed to recognize the characteristics of its resource. For example, the arbitrator for an interrupt resource of a conventional personal computer can recognize that this particular resource includes a certain number of interrupt elements.
An arbitrator, responsive to a list of device configurations, determines whether the resource elements are available to satisfy the resource element requirements defined by the device configurations. In turn, the arbitrator allocates the available resource elements in the event that resource elements are available to satisfy the resource element requirements defined by the device configurations. In contrast, the arbitrator generates an error message representing configuration failure in the event that the arbitrator fails to determine that resource elements are available to satisfy the resource element requirements.
In furtherance of these principles, it is an object of the present invention to provide a system for allocating resources for use by devices of a computer.
It is a further object of the present invention to provide a system that determines a conflict-free allocation of resources for use by the devices of the computer.
It is a further object of the present invention to provide a system that compares the resource requirements for devices with the available resources in the computer to determine a conflict-free allocation of resources for use by the devices.
That the present invention accomplishes these objects and offers the above-described advantages will be apparent to those skilled in the art from the following description, the appended claims, and the accompanying drawings.